package com.yanqu.road.server.manager.activity.zhenhuan;

import java.util.Comparator;

public class ZhenHuanPartyComparator implements Comparator<CrossZhenHuanPartyInfo> {
    @Override
    public int compare(CrossZhenHuanPartyInfo o1, CrossZhenHuanPartyInfo o2) {
        int compare = Long.compare(o2.getSortPrestige(), o1.getSortPrestige());
        if (compare == 0) {
            compare = Integer.compare(o1.getSortJoinNum(), o2.getSortJoinNum());
        }
        if (compare == 0) {
            compare = Long.compare(o1.getPartyId(), o2.getPartyId());
        }
        return compare;
    }
}
